home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / Vk / VkNode.z / VkNode
Encoding:
Text File  |  2002-10-03  |  10.5 KB  |  331 lines

  1.  
  2.  
  3.  
  4. VVVVkkkkNNNNooooddddeeee((((3333xxxx))))                                                          VVVVkkkkNNNNooooddddeeee((((3333xxxx))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      VkNode - Base node class used by VkGraph
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      VkComponent
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <Vk/VkNode.h>
  16.  
  17. PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
  18.    CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr////DDDDeeeessssttttrrrruuuuccccttttoooorrrr
  19.            VkNode(void);
  20.  
  21.            VkNode(const char *name,const char *label);
  22.  
  23.            VkNode(const char *name,
  24.                   VkNode *parent,
  25.                   const char *label);
  26.  
  27.            virtual void ~VkNode(void);
  28.  
  29.  
  30.    SSSSoooorrrrttttiiiinnnngggg
  31.            static void setSortFunction(VkNodeSortFunction f);
  32.  
  33.            void sortChildren(void);
  34.  
  35.  
  36.    AAAAcccccccceeeessssssss FFFFuuuunnnnccccttttiiiioooonnnnssss
  37.            virtual char* label(void);
  38.  
  39.            int nChildren(void);
  40.  
  41.            int nParents(void);
  42.  
  43.  
  44.    FFFFiiiinnnnddddiiiinnnngggg PPPPaaaarrrreeeennnntttt////CCCChhhhiiiillllddddrrrreeeennnn
  45.            VkNode* findChild(char* name);
  46.  
  47.            VkNode* findParent(char* name);
  48.  
  49.            VkNode* child(int index);
  50.  
  51.            VkNode* parent(int index);
  52.  
  53.  
  54. PPPPRRRROOOOTTTTEEEECCCCTTTTEEEEDDDD PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
  55.    BBBBuuuuiiiillllddddiiiinnnngggg wwwwiiiiddddggggeeeettttssss
  56.            virtual void build(Widget parent);
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. VVVVkkkkNNNNooooddddeeee((((3333xxxx))))                                                          VVVVkkkkNNNNooooddddeeee((((3333xxxx))))
  71.  
  72.  
  73.  
  74.    ____llllaaaabbbbeeeellll
  75.            char* _label;
  76.  
  77.  
  78. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  79.           The VkNode class is used by the VkGraph class as a node in an
  80.           abstract graph that can create a widget for display on demand. By
  81.           default, this class creates an XmIconGadget as the widget displayed.
  82.           VkNode is often subclassed to alter the widgets used to display
  83.           nodes, as well as to maintain other data associated with a node.
  84.  
  85.  
  86.  
  87. DDDDEEEERRRRIIIIVVVVIIIINNNNGGGG SSSSUUUUBBBBCCCCLLLLAAAASSSSSSSSEEEESSSS
  88.           Subclasses of VkNode can be created to provide a place to maintain
  89.           additional data, or to change the way the node displays itself in a
  90.           graph. The VkGraph widget calls the VkNode::build() function when it
  91.           needs a widget. Derived classes can override this virtual function
  92.           if desired. This function is expected to create a widget, or
  93.           widgets, assigning the widget or root of a widget hierarchy to the
  94.           __b_a_s_e_W_i_d_g_e_t member. Derived classes should call
  95.           installDestroyHandler() after creating the __b_a_s_e_W_i_d_g_e_t. See
  96.           VkComponent for details. The VkNode class supports a __l_a_b_e_l member
  97.           which may be used to specify a label for a node. If this makes sense
  98.           for the nodes created by a subclass, this member is available.
  99.  
  100.           Derived classes must be prepared for widgets to be created and
  101.           destroyed dynamically, under the control of the graph widget.
  102.  
  103.  
  104.  
  105. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  106.    bbbbuuuuiiiilllldddd(((())))
  107.            virtual void build(Widget parent);
  108.  
  109.  
  110.           Create a widget as a child of the specified parent to be displayed
  111.           in a graph.
  112.  
  113.    VVVVkkkkNNNNooooddddeeee(((())))
  114.            VkNode(void);
  115.  
  116.  
  117.           Initialize a VkNode object. A unique name for the object is
  118.           generated automatically.
  119.  
  120.    VVVVkkkkNNNNooooddddeeee(((())))
  121.            VkNode(const char *name, const char *label);
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. VVVVkkkkNNNNooooddddeeee((((3333xxxx))))                                                          VVVVkkkkNNNNooooddddeeee((((3333xxxx))))
  137.  
  138.  
  139.  
  140.           Create a VkNode object with the given name and a label to be used
  141.           when the node is displayed.
  142.  
  143.    VVVVkkkkNNNNooooddddeeee(((())))
  144.            VkNode(const char *name,
  145.                   VkNode *parent,
  146.                   const char *label);
  147.  
  148.  
  149.           Create a VkNode object with a specified parent in a graph. The
  150.           widget has the given name and a label to be used when the node is
  151.           displayed.
  152.  
  153.    sssseeeettttSSSSoooorrrrttttFFFFuuuunnnnccccttttiiiioooonnnn(((())))
  154.            static void setSortFunction(VkNodeSortFunction f);
  155.  
  156.  
  157.           Install a sort function to be used when sorting the graph. The form
  158.           of the sort function is
  159.  
  160.            int (*VkNodeSortFunction)(VkNode *child1, VkNode *child2);
  161.  
  162.  
  163.           The function is expected to conform to qsort conventions: the
  164.           function must return an integer less than, equal to, or greater than
  165.           zero according to whether the first argument is to be considered be
  166.           less than, equal to, or greater than the second.
  167.  
  168.    ~~~~VVVVkkkkNNNNooooddddeeee(((())))
  169.            virtual void ~VkNode(void);
  170.  
  171.  
  172.           Free all memory associated with a VkNode object. The widget is
  173.           destroyed, and all connections to other nodes are removed.  The
  174.           object is also automatically removed from the VkGraph abstract
  175.           graph.
  176.  
  177.    llllaaaabbbbeeeellll(((())))
  178.            virtual char* label(void);
  179.  
  180.  
  181.           Returns any label associated with this node.
  182.  
  183.    nnnnCCCChhhhiiiillllddddrrrreeeennnn(((())))
  184.            int nChildren(void);
  185.  
  186.  
  187.           Returns the number of children connected to this node.
  188.  
  189.    nnnnPPPPaaaarrrreeeennnnttttssss(((())))
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. VVVVkkkkNNNNooooddddeeee((((3333xxxx))))                                                          VVVVkkkkNNNNooooddddeeee((((3333xxxx))))
  203.  
  204.  
  205.  
  206.            int nParents(void);
  207.  
  208.  
  209.           Returns the number of parents connected to this node.
  210.  
  211.    ffffiiiinnnnddddCCCChhhhiiiilllldddd(((())))
  212.            VkNode* findChild(char *name);
  213.  
  214.  
  215.           Return the VkNode object for the named child. This function searches
  216.           only immediate children.
  217.  
  218.    ffffiiiinnnnddddPPPPaaaarrrreeeennnntttt(((())))
  219.            VkNode* findParent(char* name);
  220.  
  221.  
  222.           Return the VkNode object for the named parent. This function
  223.           searches only immediate parents.
  224.  
  225.    cccchhhhiiiilllldddd(((())))
  226.            VkNode* child(int index);
  227.  
  228.  
  229.           Returns a child VkNode object by index.
  230.  
  231.    ppppaaaarrrreeeennnntttt(((())))
  232.            VkNode* parent(int index);
  233.  
  234.  
  235.           Returns a parent VkNode object by index.
  236.  
  237.    ssssoooorrrrttttCCCChhhhiiiillllddddrrrreeeennnn(((())))
  238.            void sortChildren(void);
  239.  
  240.  
  241.           Apply the installed sort function to this node's immediate children.
  242.  
  243. DDDDAAAATTTTAAAA MMMMEEEEMMMMBBBBEEEERRRR DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  244.    ____llllaaaabbbbeeeellll
  245.            char* _label;
  246.  
  247.  
  248.           A character string that can be used to label node, distinct from the
  249.           node's name.
  250.  
  251. IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  252.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCoooommmmppppoooonnnneeeennnntttt
  253.           installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
  254.           setDefaultResources(), getResources(), manage(), unmanage(),
  255.           baseWidget(), okToQuit(), _name, _baseWidget, _w, deleteCallback
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. VVVVkkkkNNNNooooddddeeee((((3333xxxx))))                                                          VVVVkkkkNNNNooooddddeeee((((3333xxxx))))
  269.  
  270.  
  271.  
  272.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCaaaallllllllbbbbaaaacccckkkkOOOObbbbjjjjeeeecccctttt
  273.           callCallbacks(), addCallback(), removeCallback(),
  274.           removeAllCallbacks()
  275.  
  276.  
  277. KKKKNNNNOOOOWWWWNNNN CCCCLLLLAAAASSSSSSSSEEEESSSS TTTTHHHHAAAATTTT UUUUSSSSEEEE TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  278.      VkGraph
  279.  
  280. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  281.      VkComponent, VkGraph, VkNode
  282.      _V_i_e_w_K_i_t _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
  283.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m, DEC Press, Bob Sheifler and Jim Gettys
  284.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m _T_o_o_l_k_i_t, DEC Press, Paul Asente and Ralph Swick
  285.      _T_h_e _O_S_F/_M_o_t_i_f _P_r_o_g_r_a_m_m_e_r_s _R_e_f_e_r_e_n_c_e, Prentice Hall, OSF
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.